<include file="Public:header"/>
<div class="aright">
          
<fieldset class="layui-elem-field layui-field-title" style="margin: 20px 30px 20px 20px;">
  <legend>修改导航</legend>
</fieldset>

<form class="layui-form bform" method="post" action="{:U('navtop/doedit')}" enctype="multipart/form-data">
  <input type="hidden" name="id" value="{$n.id}">
  <div class="layui-form-item">
    <label class="layui-form-label">导航名称</label>
    <div class="layui-input-block">
      <input type="text" name="name" value="{$n.name}" required lay-verify="required" placeholder="必填内容" autocomplete="off" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item" style="width: 300px;">
    <label class="layui-form-label">导航分类</label>
    <div class="layui-input-block">
      <select name="tid">
       <option value="0">顶级导航</option>
        <volist name="ns" id="vo">
        <option <if condition="$n[id] eq $vo[id]">disabled</if>
		<if condition="$n[tid] eq $vo[id]">selected="selected"</if>value="{$vo.id}"><?php echo str_repeat('-',$vo[level]*8);?>{$vo.name}</option>
        </volist>
      </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">导航排序</label>
    <div class="layui-input-block">
      <input type="text" name="sort" value="{$n.sort}" placeholder="请输入内容" autocomplete="off" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">窗口模式</label>
    <div class="layui-input-block">
      <input type="checkbox" name="blank" value="1" title="新窗口" <if condition="$n['blank'] eq 1">checked</if>>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">前台显示</label>
    <div class="layui-input-block">
      <input type="radio" name="show" value="1" title="显示" <if condition="$n['show'] eq 1">checked</if>>
      <input type="radio" name="show" value="0" title="隐藏" <if condition="$n['show'] eq 0">checked</if>>
    </div>
  </div>
  
  <div class="layui-form-item">
    <label class="layui-form-label">连接地址</label>
    <div class="layui-input-block">
      <input type="text" name="link" value="{$n.link}" placeholder="请输入内容" autocomplete="off" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
	  <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
      <button class="layui-btn layui-btn-primary" onclick="history.go(-1)">返回</button>
    </div>
  </div>

</form>
<script>
layui.use('form', function(){
  var form = layui.form();
});
</script>
</div>
</div>
</body>
</html>